package com.spring.nio.core.configuration;

import java.net.InetSocketAddress;
import java.nio.channels.Selector;

/**
 * @author: YSFY
 * @date: 2021-03-24 20:26
 * @pacage_name: com.spring.nio.core.configuration
 * @class_name: SelectorEntity
 * @description: selector实体类
 */
public final class SelectorEntity {

    private String selectorName;

    private Selector selector;

    private Thread thread;

    private Runnable selectorRunnable;

    public static SelectorEntity getInstance() {
        return new SelectorEntity();
    }

    public String getSelectorName() {
        return selectorName;
    }

    public SelectorEntity setSelectorName(String selectorName) {
        this.selectorName = selectorName;
        return this;
    }

    public Selector getSelector() {
        return selector;
    }

    public SelectorEntity setSelector(Selector selector) {
        this.selector = selector;
        return this;
    }

    public Thread getThread() {
        return thread;
    }

    public SelectorEntity setThread(Thread thread) {
        this.thread = thread;
        return this;
    }

    public Runnable getSelectorRunnable() {
        return selectorRunnable;
    }

    public SelectorEntity setSelectorRunnable(Runnable selectorRunnable) {
        this.selectorRunnable = selectorRunnable;
        return this;
    }
}
